package com.wrapper.es;

import com.wrapper.core.elasticsearch.Page;
import com.wrapper.core.elasticsearch.annotations.Aggregation;
import com.wrapper.core.elasticsearch.annotations.SearchFiled;
import com.wrapper.core.elasticsearch.annotations.SearchRangeFrom;
import com.wrapper.core.elasticsearch.annotations.SearchRangeTo;
import lombok.Data;

import java.util.Date;

@Data
public class OrderQuery extends Page {

    @SearchFiled(dateFormat = "yyyy-MM-dd")
    private Date createDate;

    @SearchRangeFrom(value = "createDate", equal = true, dateFormat = "yyyy-MM-dd")
    private Date createDateStart;

    @SearchRangeTo(value = "createDate", equal = true, dateFormat = "yyyy-MM-dd")
    private Date createDateEnd;

    private Integer createMonth;
    @SearchRangeFrom(value = "createMonth", equal = true)
    private Integer createMonthStart;
    @SearchRangeTo(value = "createMonth", equal = true)
    private Integer createMonthEnd;

    private Integer createYear;

    @Aggregation("parentAggregation")
    private String aggregation;

    @Aggregation(parent = "parentAggregation")
    private String subAggregation;

}
